1. Field of the Invention
This invention relates to communication protocols and application tools development, and particularly to a method for implementing Message Passing Interface (MPI-2) one-sided communication by using Low-level Applications Programming Interface (LAPI) active messaging capabilities.
2. Description of Background
High computational power of personal computers (PCs) combined with the emergence of low latency and high bandwidth interconnects has led to the trend of cluster computing. In this area, Message Passing Interface (MPI) has become the standard for writing parallel applications. MPI-2 has been introduced as an enhancement of MPI-1 with one-sided communication as one of its main additional features.
In MPI-2 one-sided communication, the sender can access some part of the remote address space directly. Such one-sided communication is also referred to as Remote Memory Access (RMA) or RMA communication. The area of memory on the target process accessible by the origin process is referred to as a Window. The MPI-2 specification defines various communication operations. These may include: (1) an MPI Put operation that transfers data to a window in the target process, (2) an MPI Get operation that transfers data from a window in the target process, and (3) an MPI Accumulate operation that combines data movement to target with a “reduce” operation. As per the semantics of one-sided communication, the return of the one-sided communication call does not guarantee the completion of the transfer. In order to guarantee the completion of one-sided operation, the user must call one of three synchronization functions defined by the MPI standard.
In MPI-2 terminology the initiating process is referred to as the origin, while the process whose memory is being accessed remotely is referred to as the target. Contrast to this is point-to-point message passing where both processes are explicitly involved in the communication. The model most suited for a given problem is determined by the algorithmic structure of the application. An important effect of one-sided communication is that communication is explicitly separated from synchronization, allowing for synchronization overhead to be amortized over several communication operations.
In addition, for one-sided communication, processes logically expose part of their memory to RMA by other processes, where the memory is the memory allocated in the private address space as process local memory. This concept is realized in MPI-2 by the definition of communication windows.
LAPI (Low-level Applications Programming Interface) is a low-level, high-performance communication interface. LAPI provides an active message-like interface along with remote memory copy and synchronization functionality. LAPI is an asynchronous communication mechanism intended to provide users the flexibility to write parallel programs with dynamic and unpredictable communication patterns. LAPI is architected to be an efficient (low latency, high bandwidth) interface. In order to keep the LAPI interface as simple as possible, it is designed with a small set of primitives. However, the limited set does not compromise on functionality expected from a communication.
Furthermore, LAPI is also a communications library available as part of software from IBM, and is designed with the following primary objectives in mind: performance, flexibility, and extensibility. The primary design consideration for LAPI is to define syntax and semantics that allow efficient implementation on the underlying hardware and software communications infrastructure. LAPI is based on the remote memory copy (RMC) model. RMC is a one-sided programming paradigm similar to the load/store model of shared memory programming. The one-sided model eases some of the difficulties of the send/receive model, which uses two-sided protocols. In addition to a set of basic functions, LAPI also provides the active message style interface. With this interface, users can add additional communications functions that are customized for their specific application or environment.
The initial implementation of MPI one-sided communication was delivered prior to MPI adopting LAPI as its transport layer and used a Message Passing Client Interface (MPCI) send and receive functionality along with the responder capability. The responder was activated when the window was created. MPI-2 one-sided operations were carried out by sending command messages from an origin to a target and by using MPCI responders to post the MPCI receive or send that matches sends and receives posted at the origin. Each responder action paid the cost of a thread activation and normally of a context switch, with a serious impact on application progress.
Therefore, the initial of MPI-2 one-sided communication did not exploit the one sided capability provided by LAPI. Considering the limitations of the aforementioned methods, it is clear that there is a need for a method for implementing MPI-2 one-sided communication that exploits the one-sided capability provided by LAPI.